//
//  TabelSCD.m
//  NursingManages
//
//  Created by Zhen Huang on 17/5/27.
//  Copyright © 2017年 huangzhen. All rights reserved.
//

#import "TabelSCD.h"
#import "Model_Hr_Scheduling.h"

@implementation TabelSCD


//查询数据 相当于数据读取操作
- (NSMutableArray *)allModelSCD :(NSString *)emp_id{
    [DBHelper.DB open];
    NSString *sqlStr = [NSString stringWithFormat:@"select * from hr_scheduling where emp_id='%@'",emp_id];
    FMResultSet *set = [DBHelper.DB executeQuery:sqlStr];
    NSMutableArray *array = [NSMutableArray array];
    while ([set next]) {
        Model_Hr_Scheduling *model = [[Model_Hr_Scheduling alloc]init];
        model.SCD_CLASS = [set stringForColumn:@"scd_class"];
        model.SCD_DATE = [set stringForColumn:@"scd_date"];
        model.SCD_GROUP_ID = [set stringForColumn:@"scd_group_id"];
        model.CLASS_NAME = [set stringForColumn:@"class_name"];
        model.EMP_ID = [set stringForColumn:@"emp_id"];
        [array addObject:model];
        
    }
    [DBHelper.DB close];
    return array;
}


@end
